#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:4996)
#include<stdio.h>
int hanoi(int n) {
    if (n == 1) return 1;
    else return hanoi(n-1)*2 + 1;
}
int main(){
    int n;
    scanf("%d", &n);
    printf("%d", hanoi(n));
    
    return 0;
}